package com.wang;

import java.util.Iterator;
import java.util.LinkedHashSet;

/**
 * @ProjectName: untitled
 * @Titile: LinkedHashSetDemo
 * @Author: 王亦凡1
 * @Description: TODO
 */
public class LinkedHashSetDemo {
    public static void main(String[] args) {
        LinkedHashSet<String>set=new LinkedHashSet<>();
        set.add("张三");
        set.add("lisi");
        set.add("wnagwu");
        set.add("wangbiao");

        Iterator<String>iterator=set.iterator();
        while (iterator.hasNext()){
            String next=iterator.next();
            System.out.println(next);
        }


    }
}
